<?
        require_once '../Navigation/functions.php';
        require_once 'data.php';
        $section='Catalogue';
        $resultT = GetAllT();
        $resultB = GetAllB();
?>

<!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Catalogue</title>
    </head>
    
    <body>
                <? include("../Navigation/tabs.php"); ?>
        <h1>Catalogue</h1>
        
          <table border="2">
        <td><a href="">Add</a></td> 
        </table>    
               
        <table border="2">
                <tr>
                <th>Products</th>
                <th>Product ID</th>                

            </tr>
                        <? while($rs = $resultT->fetch_assoc()){ ?>
                <tr>
                        <td><?=$rs['Name']?></td>
                        <td><?=$rs['Product_id']?></td>

                    <td>
                        
                        <a href="detailst.php?id=<?=$rs['id']?>">View Details</a>
                    </td>
                </tr>
                        
            <? } ?>
            
            <? while($rs = $resultB->fetch_assoc()){ ?>
                <tr>
                        <td><?=$rs['Name']?></td>
                        <td><?=$rs['Product_id']?></td>

                    <td>
                        
                        <a href="detailsb.php?id=<?=$rs['id']?>">View Details</a>
                    </td>
                </tr>
             <? } ?>
        </table>
    </body>
</html>

<? //$conn->close(); ?>

